import request from '@/utils/request'
import qs from 'qs'
/**
 * 查询所有的角色信息
 */
export function getAllRole() {
	return request({
		url: '/role/getAll',
		method: 'get',
	})
}

export function updatePermission(roleid,permissionid){
	return request({
		url:'/rolePermission/update?roleid='+roleid+'&permissionid='+permissionid,
		method:'post',
		paramsSerializer: {
			serialize(params) {
			  	// priceList: [1, 2] => priceList=1,2
				return qs.stringify(params, {arrayFormat: 'comma'})
			}
		},
	})
}
